<!DOCTYPE html>
html(lang="en" data-ng-app="App")
    head
        meta(charset="UTF-8")
        meta(http-equiv="X-UA-Compatible" content="IE=edge")
        meta(content="width=device-width, initial-scale=1" name="viewport")
        base(href="/")
        title 登录云图系统
        block stylesheets
            link(rel="stylesheet", href="/assets/font-awesome/css/font-awesome.min.css")
            link(rel="stylesheet", href="/assets/bootstrap/css/bootstrap.min.css")
            link(rel="stylesheet", href="/assets/bootstrap-switch/css/bootstrap-switch.min.css")
            link(rel="stylesheet", href="/assets/simple-line-icons/css/simple-line-icons.css")
            link(rel="stylesheet", href="/assets/metronic/css/components.min.css")
            link(rel="stylesheet", href="/assets/metronic/css/plugins.min.css")
            link(rel="stylesheet", href="/assets/metronic/css/layout.min.css")
            link(rel="stylesheet", href="/assets/metronic/css/login.css")
            link(rel="stylesheet", href="/assets/metronic/css/default.min.css")
            link(rel="stylesheet", href="/assets/leaflet/leaflet.awesome-markers.min.css")
            lin(rel="shortcut icon" href="/images/favicon.ico")
    body.login(data-ng-controller="loginCtrl")
        .logo
            a(href="")
                img(src="/images/logo-big.png", alt="")
        #form-wrapper.content
            form.login-form(action="" novalidate)
                h3.form-title 登录云图系统
                div.alert.alert-danger.display-hide(data-ng-class="{'':showLoginFail,'display-hide':!showLoginFail}")
                    span 用户名或密码错误
                .form-group
                    label.control-label 用户名
                    .input-icon
                        i.fa.fa-user
                        input.form-control.placeholder-no-fix(type="text" placeholder="用户名" autofocus name="username" autocomplete="off" data-ng-model="userName" data-ng-keyup="$event.keyCode === 13 && login($event)")
                .form-group
                    label.control-label 密码
                    .input-icon
                        i.fa.fa-lock
                        input.form-control.placeholder-no-fix(type="password" placeholder="密码" name="password" data-ng-model="password" data-ng-keyup="$event.keyCode === 13 && login($event)")
                .form-actions
                    span &nbsp;
                    button#login-btn.btn.btn-sm.green.pull-right(type="submit" data-ng-click="login($event)") 登录
                .create-account
                    p(style="font-size:12px;margin:0;display:inline-block;") 
                        | 还没有账户?&nbsp;
                        a#register-btn 注册一个账号
                    a#forget-password.pull-right(style="font-size:12px;") 忘记密码
            form.forget-form(novalidate)
                h3 忘记密码
                p 输入你的邮箱来重新获取你的密码。
                div.ng-hide.alert.alert-info(data-ng-show="showRetrievePassword")
                    span 密码已发送至你的邮箱
                .form-group
                    .input-icon
                        i.fa.fa-envelope
                        input.form-control.placeholder-no-fix(type="text" autocomplete="off" placeholder="邮箱" name="email")
                .form-group
                    button.btn.btn-sm.grey-salsa.btn-outline(type="button" id="back-btn" ) 返回
                    button.btn.btn-sm.green.pull-right(type="submit") 找回密码
            form.register-form.register1(novalidate)
                h3(style="margin-top:5px;") 注册一个账号
                p 填写你的个人信息:
                .form-group
                    label.control-label(for="corporation") 单位
                    .input-icon
                        i.fa.fa-university
                        select.form-control.placeholder-no-fix(data-ng-options="c.name for c in corporationList" data-ng-model="corporation")
                        input(type="hidden" name="corporation" value="{{corporation.shortName}}")
                .form-group
                    label.control-label(for="department") 部门
                    .input-icon
                        i.fa.fa-building
                        select.form-control.placeholder-no-fix(data-ng-options="c.name for c in corporation.departments" data-ng-model="department")
                        input(type="hidden" name="department" value="{{department.name}}")
                .form-group
                    label.control-label(for="viewer") 审核人
                    .input-icon
                        i.fa.fa-male
                        select.form-control.placeholder-no-fix(data-ng-model="reviewer" required data-ng-options="p for p in department.admins")
                        input(input type="hidden" name="reviewer" value="{{reviewer}}")
                .form-group
                    label.control-label(for="realName") 姓名
                    .input-icon
                        i.fa.fa-font
                        input.form-control.placeholder-no-fix(type="text" name="realName" data-ng-model="realName" required placeholder="你的真实姓名")
                .form-group
                    label.control-label(for="phone") 电话
                    .input-icon
                        i.fa.fa-phone
                        input.form-control.placeholder-no-fix(type="text" name="phone" data-ng-model="phone" required placeholder="手机号码")
                .form-group
                    label.control-label(for="mail") 邮箱
                    .input-icon
                        i.fa.fa-envelope
                        input.form-control.placeholder-no-fix(type="text" name="mail" data-ng-model="mail" required placeholder="邮箱")
                .form-actions
                    button#register-back-btn1.btn.grey-salsa.btn-outline.btn-sm(type="button") 返回
                    button#next-register.btn.green.pull-right.btn-sm(type="button") 下一步
            form.register-form.register2(novalidate)
                h3(style="margin-top:5px;") 注册一个账号
                p 填写你的账户信息:
                div.ng-hide.alert.alert-info(data-ng-show="showRegisterSuccess")
                    span 你的申请已经提交,请耐心等待
                .form-group.forget-account
                    label.control-label(for="username") 用户名
                    .input-icon
                        i.fa.fa-user
                        input.form-control.placeholder-no-fix(type="text" data-ng-model="userName" name="username" required placeholder="用户名,只允许英文字母" data-ng-change="userNameChange(angular.element(this))")
                .form-group
                    label.control-label(for="password") 密码
                    .input-icon
                        i.fa.fa-lock
                        input.form-control.placeholder-no-fix(type="password" name="password" data-ng-model="password1" required placeholder="输入你的密码")
                .form-group
                    label.control-label(for="password2") 再次输入密码
                    .input-icon
                        i.fa.fa-check
                        input.form-control.placeholder-no-fix(type="password" name="password2" data-ng-change="passwordChange()" data-ng-model="password2" required placeholder="再次输入你的密码")
                .form-actions
                    button#register-back-btn2.btn.grey-salsa.btn-outline.btn-sm(type="button") 返回
                    button(type="button").btn.green.pull-right.btn-sm 注册账号
        script(src="/assets/jquery/jquery.min.js")
        script(src="/assets/metronic/js/login.js")
        script(src="/assets/angular/angular.min.js")
        script(src="/login/index.js")